import sys
import random

def f(lst):
    lst.sort()
    ln=len(lst)
    s = (ln-1)//2
    e = ln//2
    return sum(lst[s:e+1])/(e+1-s)

a=[[1,7,2,30,1234,8,60]]
for i in range(9):
    n = random.randint(6,1000)
    l =[random.randint(1,1000) for  j in range(n)]
    a.append(l)

for i  in range(10):
    fin = open('{}.in'.format(i+1),'w')
    fout = open('{}.out'.format(i+1),'w')
    print(*a[i],file=fin)
    print(f(a[i]),file=fout)
    fin.close()
    fout.close()
